package cn.wolfcode.crm.domain;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;

import lombok.Getter;
import lombok.Setter;

@Getter@Setter
public class Department {
	private Long id;

	private String name;

	private String sn;
	
	public String getJson() throws JsonProcessingException {
		ObjectMapper mapper = new ObjectMapper();
		Map<String, Object> map = new HashMap<>();
		map.put("id", id);
		map.put("name", name);
		map.put("sn", sn);
		return mapper.writeValueAsString(map);
	}

}
